package com.thunisoft.incremental.dao;

import com.thunisoft.incremental.common.model.Group;
import com.thunisoft.incremental.common.model.GroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface GroupMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @SelectProvider(type=GroupSqlProvider.class, method="countByExample")
    int countByExample(GroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @DeleteProvider(type=GroupSqlProvider.class, method="deleteByExample")
    int deleteByExample(GroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Delete({
        "delete from copy_from.t_group",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Insert({
        "insert into copy_from.t_group (c_id, c_name, ",
        "c_code)",
        "values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ",
        "#{code,jdbcType=VARCHAR})"
    })
    int insert(Group record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @InsertProvider(type=GroupSqlProvider.class, method="insertSelective")
    int insertSelective(Group record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @SelectProvider(type=GroupSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="c_id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="c_name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="c_code", property="code", jdbcType=JdbcType.VARCHAR)
    })
    List<Group> selectByExample(GroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Select({
        "select",
        "c_id, c_name, c_code",
        "from copy_from.t_group",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="c_id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="c_name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="c_code", property="code", jdbcType=JdbcType.VARCHAR)
    })
    Group selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=GroupSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Group record, @Param("example") GroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=GroupSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Group record, @Param("example") GroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=GroupSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Group record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_group
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Update({
        "update copy_from.t_group",
        "set c_name = #{name,jdbcType=VARCHAR},",
          "c_code = #{code,jdbcType=VARCHAR}",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(Group record);
}